< previous page page_237 next page >

Page 237
As soon as you understand the basic idea of relational databases, you'll begin to see tables, rows, and columns everywhere. You've always seen tables; however, you probably didn't think of them as such. Everyday information that you read in the paper are actually tables of information containing rows and columns of data. Things such as the stock market report or football standings all can be placed into a database table.
Laying Out the Database Structure
You should meet several objectives when designing the tables in your database. Although it would be nice to say that you must meet these objectives, it's sometimes just not possible to meet all of them, as you'll see:
Remove repetitive data
Have the ability to find unique records quickly
Keep the database easy to maintain
Allow changes to the database structure easy to perform
By striving for these objectives, you'll create a database that can grow with your application. The beginning steps in designing your database actually take place in the application design itself. You must first define what tasks your application will perform. As you're defining the tasks to be performed in the functional specification, you're actually performing the first step in the database design process. These functional specifications allow you to start laying out the tables and the related data that you'll need. The remaining steps that you need to do are as follows:
1. Define the data needed for the application.
2. Organize the data into tables.
3. Set the relationships between the tables.
4. Create any table indexes that might be needed.
5. Define any data-validation requirements.
6. Define any additional queries that might be needed by the application.
After you determine the data that your application needs, you need to organize the data into groups that make it easy to retrieve the information. Within the database, the data will be stored in one or more tables.
Setting Up Tables and Columns
A table is really a collection of related data for a particular idea. By deciding what the main idea is for a table, you can determine whether a given piece of information belongs in that table. For example, a library wants to keep track of books and videos that it has

 
< previous page page_237 next page >

If you like this book, buy it!